package com.example.demo.api.ecom;

import com.example.demo.bean.vo.LoyaltyJoin;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import retrofit2.http.*;

@RetrofitClient(baseUrl = "${ecom.loyalty.base}")
public interface LoyaltyApi {
    /**
     * <p> 配置: liecomm.loyalty.reward.url (PropertiesUtil)
     * <p> 请求头: apikey
     * <p> 开关: loyalty.switch
     */
    @GET("api/v1/aggre/rewardsPoints")
    Object loyaltyInfo(@Query("country") String country,@Query("language")  String language,@Query("userId")  String userId, @Query("storeId") String storeId);

    /**
     * <p> 配置: liecomm.loyalty.profile.url (PropertiesUtil)
     */
    @POST("api/v1/loyalty/update/profile")
    Object loyaltyUpdateProfile(@Body LoyaltyJoin loyaltyJoin);

    /**
     * <p> 配置: liecomm.loyalty.join.url (PropertiesUtil)
     */
    @POST("{country}/{language}/login/pw/enrollLoyalty")
    Object enrollLoyalty(@Path("country") String country, @Path("language") String language, @Body LoyaltyJoin loyaltyJoin);

    /**
     * <p> 配置: liecomm.loyalty.join.store.url (PropertiesUtil)
     */
    @POST("/{country}/{language}/{store}/login/pw/enrollLoyalty")
    Object enrollLoyaltyByStore(@Body LoyaltyJoin loyaltyJoin);

    /**
     * 同步用户信息到ecom
     */
    @GET("/%s/%s/login/pw/syncALCUserInfoToHybris")
    Object syncALCUserInfoToHybris();


}
